package com.zsrt.day20170405.ch01;

public class PrintStar {
	public static void main(String[] args) {
		/*for(int i=0;i<5;i++){
			for(int j=5;j>i;j--){
				System.out.print("*");
			}
			System.out.println();
		}*/
		/*for(int i=1;i<=4;i++){			
			for(int j=4-i;j>=0;j--){
				System.out.print(" ");
			}
			for(int j=1;j<=4-i;j++){
				System.out.print(" ");
			}
			for(int k=1;k<=(2*i-1);k++){
				System.out.print("*");
			}
			System.out.println();
		}
		for(int i=1;i<=3;i++){
			for(int j=0;j<=i;j++){
				System.out.print(" ");
			}
			for(int k=1;k<=2*(4-i)-1;k++){
				System.out.print("*");
			}
			System.out.println();
		}*/
		
		/*System.out.println("   "+"*"+"   ");
		for(int i=1;i<=3;i++){
			for(int j=1;j<=(3-i);j++){
				System.out.print(" ");
			}
			System.out.print("*");
			for(int k=1;k<=2*i-1;k++){
				System.out.print(" ");
			}
			System.out.print("*");
			System.out.println();
		}
		for(int i=1;i<=2;i++){
			for(int l=1;l<=i;l++){
				System.out.print(" ");
			}
			System.out.print("*");
			for(int j=1;j<=(3-i)*2-1;j++){
				System.out.print(" ");
			}
			System.out.print("*");
			System.out.println();
		}
		System.out.println("   "+"*"+"   ");*/
		
		/*System.out.println("*******");
		for(int i=1;i<=3;i++){
			System.out.print("*");
			System.out.print("     ");
			System.out.print("*");
			System.out.println();
		}
		System.out.println("*******");*/
		
		for(int i=1;i<=5;i++){
			System.out.print("*");
			for(int j=1;j<=5;j++){
				if(i==1||i==5){
					System.out.print("*");
				}else{
					System.out.print(" ");
				}
			}
			System.out.print("*");
			System.out.println();
			
		}
	}

}
